#include <iostream>
#include <algorithm>
using namespace std;

class money {
public:
	double m;
	double v;
	double price;
	bool operator<(money a) {
		return this->price < a.price;
	}
};
int main(void) {
	money a[105];
	double t;
	int i,n;
	cin >> n >> t;
	double answer = 0;
	for (i = 0; i < n; i++) {
		cin >> a[i].m >> a[i].v;
		a[i].price = a[i].v / a[i].m;
	}

	sort(a, a + n);
	for (i = n - 1; i >= 0; i--) {
		
		if(t - a[i].m>=0){
			answer += a[i].v;
			t-=a[i].m;
		}else{
			answer+=t*a[i].price;
			break;
		}
	}
	printf("%.2lf", answer);
	return 0;
}